<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />
        
        <title>String Trimming Documentation</title>
        
        <script src="/js/greyspots.js" type="text/javascript"></script>
        <link href="/css/greyspots.css" type="text/css" rel="stylesheet" />
        
        <script src="/js/ace/ace.js" data-ace-base="/js/ace/" type="text/javascript" charset="utf-8"></script>
        <script src="/js/ace/ext-language_tools.js" type="text/javascript"></script>
        <script src="/js/ace/ext-searchbox.js" type="text/javascript"></script>
        
        <script src="doc-library/doc.js" type="text/javascript"></script>
        <link href="doc-library/doc.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <gs-jumbo>
            <h1 class="text-center">String Trimming Function</h1>
        </gs-jumbo>
            
        <gs-container min-width="sml;med;lrg">
                <h3 class="doc-header">Function:</h3>
                <div class="doc-section doc-mono">
                    <p>GS.trim(&lt;STRING-TO-BE-TRIMMED&gt;, &lt;STRING-TO-TRIM-OFF&gt;);</p>
                </div>
                
                <h3 class="doc-header">Description:</h3>
                <div class="doc-section">
                    <p>The GS.trim function is for cutting off characters at the beginning and end of a string.</p>
                </div>
                
                <h1 class="doc-header">Examples:</h1>
                <div class="doc-section">
                    <div class="doc-example-description">
                        <span class="h3">Skeleton Example:</span><br />
                        <p>When you click the button the text of the first text control will have the text of the second text control trimmed off of it and the result will be put in the second text control.</p>
                    </div>
                    <gs-doc-example>
                        <template for="html" height="8">
                            <gs-text id="text-to-be-trimmed" value="---a-String to be trimmed-a---"></gs-text>
                            <gs-text id="text-to-trim-off" value="-"></gs-text>
                            <gs-button onclick="testTrim()">Trim</gs-button>
                            <gs-text id="text-trimmed"></gs-text>
                        </template>
                        <template for="js" height="10">
                            function testTrim() {
                                document.getElementById('text-trimmed').value =
                                    GS.trim(document.getElementById('text-to-be-trimmed').value,
                                            document.getElementById('text-to-trim-off').value);
                            }
                        </template>
                    </gs-doc-example>
                </div>
        </gs-container>
    </body>
</html>